This invention relates generally to digital image processing and, more particularly, relates to a method for color halftone reproduction.
Displays for personal computers have steadily improved since the days when monochrome monitors were used in simple word processors and text-based computer systems back in the 1970s. In 1981, the Color Graphics Adapter (CGA) was introduced, which was capable of rendering four colors and had a maximum resolution of 320 pixels horizontally by 200 pixels vertically. While CGA was all right for simple computer applications and simple games, it did not offer sufficient image resolution for desktop publishing and more sophisticated graphics applications.
In 1984, the Enhanced Graphics Adapter (EGA) display was introduced. It increased the color capability from four colors up to 16 different colors and increased the resolution to 640 pixels horizontally by 350 pixels vertically. This improved the appearance of the display and made it possible to read text more easily than with CGA displays. Nevertheless, EGA did not offer sufficient image resolution for high-level applications such as graphic design and desktop publishing.
In 1987, the Video Graphics Array (VGA) display system became available and has become the accepted minimum standard for PC clones as indicated by the multitude of VGA monitors still in use. A user can choose between 16 colors at 640xc3x97480 pixels, or 256 colors at 320xc3x97200 pixels.
In 1990, the Extended Graphics Array (XGA) display was introduced. A later version, XGA-2 offers 800 by 600 pixel resolution in true color (16 million colors) and 1,024 by 768 resolution in 65,536 colors. Most PC monitors being sold today are described as Super Video Graphics Array (SVGA) displays. SVGA originally just meant xe2x80x9cbeyond xe2x80x9cVGAxe2x80x9d and was not a single standard. The Video Electronics Standards Assocation (VESA) has established a standard programming interface for SVGA displays, called the VESA BIOS Extension. Typically, an SVGA display can support a palette of up to 16 million colors, although the amount of video memory in a particular computer may limit the actual number of displayed colors to something less than that.
When the Internet first became widely available, the colors used to display images was of no great concern. The recent growth in the Internet has led to an increase in web based e-commerce. As a result of this increase, the number of images used on the Internet has exploded in growth and one problem that has occurred is the color matching between the color that a user sees on the computer monitor and the actual color of the item represented by the image. Computer users are demanding a better color match between what they see on the screen and the actual item. This has led to an increased number of colors used to display the image, but at the expense of image size and download times. This increase in the number of colors typically required new equipment that incorporated the new display adapters, in the form of hardware and/or software, that were capable of rendering the additional colors. However, not all users upgraded or acquired new equipment as is apparent by the large installed base of computer equipment.
Many monitors in use today are VGA monitors with the limited choice of 16 colors at 640xc3x97480 pixels or 256 colors at 320xc3x97200 pixels. To account for the installed base of equipment, in addition to increasing the number of colors available, a number of different color management techniques have been used in order to provide some form of matching between the colors available on a computer monitor and the true color of the image or item.
One such method is halftoning. Halftoning describes the process of displaying or printing an image with a device that is capable of rendering only a limited number of color levels. The position and arrangement of the limited colors creates the illusion of a continuous-tone, true-color image due to the physiological limitation of the human visual system. The human eye can not see the individual dot patterns when an image represented by a set of dot patterns is viewed at a distance. When viewing a very small area from a normal distance, the eye will integrate the intensity of neighboring pixels such that continuous intensity variation is perceived. In digital halftoning, the image to be reproduced is scanned to generate digitized signals representative of the color contained in small incremental regions (xe2x80x9cpixelsxe2x80x9d) of the image being processed. Other methods are known in the art for obtaining an image in digital form. The representative signals are then processed to generate digitally encoded signals that are representative of the red, green, and blue components for each of the image pixels. For color printing, these representative signals are processed to generate digitally encoded signals that are representative of the cyan, yellow, magenta, and often black (CYMK) components used in printing using techniques known in the art. These digitally encoded signals represent the intensity value of each of the colors, which ranges from no intensity (e.g., no color of that component) to full intensity (e.g, full color of that component).
In halftoning, generally the decision to intensify or not intensify a pixel at a point with coordinates (x, y) depends on the desired intensity value at that point and on an xe2x80x9cnxc3x97nxe2x80x9d halftone matrix. To determine the intensity of a color at the coordinate (x, y), the intensity value at that coordinate is compared to an entry in the halftoning matrix. For example, if only no intensity and full-intensity colors are able to be rendered, the color at coordinate (x, y) of the image is intensified if the intensity value at coordinate (x, y) is greater than the entry in the halftoning matrix at row a, column b. The points a and b are calculated with a modulo function where a=x modulo n and b=y modulo n.
A 4xc3x974 halftone matrix is shown below. The halftone entry or value for a coordinate of (1042, 7) would be the value of the matrix at matrix position (1042 modulo 4, 7 modulo 4), which is position (2, 3), and the halftone value is 144. If the intensity value at the (1042, 7) position is greater than the halftone value of 144, then the color is intensified. If the intensity value is less than the halftone value, the color is not intensified.
The halftone matrix selected affects the quality of the displayed image and different xe2x80x9cnxc3x97nxe2x80x9d halftone matrices will result in different levels of intensities from the original image. The methods used to select or create a halftone matrix are beyond the scope of the instant invention.
Conventional halftoning methods require the use of n3 colors, where n is any number greater than 1. When using only zero intensity and full intensity colors, 23, or 8 colors are required. When using zero intensity, half intensity and full intensity colors, 3, or 27 colors are required using conventional halftoning methods. For computer equipment capable of rendering a large number of colors, these methods work adequately. However, these methods are a problem when using a small number of colors. For example, when rendering a display in VGA mode, only 16 colors are available when using a 640xc3x97480 pixel resolution. The conventional halftoning method did not allow the use of a sub-set of half intensity colors, so only 8 (23) of these 16 colors could be used. These eight colors are the combinations of 0X00 (e.g., no intensity) and 0XFF (e.g., full intensity) of the red, green, and blue (RGB) color components used in monitors. No half-intensity colors can be used in these methods. In order to use more colors, these methods would require 27 (3) colors. These colors are the combinations of 0X00 (e.g., no intensity), 0X80 (e.g., half intensity) and 0XFF (e.g., full intensity) of the red, green, and blue (RGB) color components. As a result of this limitation with conventional halftoning implementations, computer users are not getting the full benefit of all the colors available from a display monitor when the display monitor is only capable of rendering a small number of colors.
In view of the above described problems existing in the art, the present invention provides a method to use all of the zero intensity, half intensity, and full intensity colors that are available from the display (e.g., 15 of the 16 VGA colors) when rendering color images that contain more than these colors (e.g., an image having several million colors) to provide a truer representation of this image on the display monitor. The method of the instant invention begins by determining the true color of the image in terms of red, green, and blue (RGB) intensity values at a given (x, y) position.
A halftone value is chosen from a halftone matrix. The maximum number of full intensity values and half intensity values of each of the RGB colors is calculated based on the maximum intensity value of the RGB colors. The number of half intensity color values are maximized. The maximum RGB intensity value is compared to a predetermined value.
If the maximum RGB intensity value is less than or equal to the predetermined value, the palette index of a color palette is set to zero and the color to be used at the (x, y) position is then selected from a color palette by comparing the RGB intensity value for each RGB color to a scaled halftone value and adjusting the palette index by predetermined values. The color to be used at the (x, y) position is then chosen by selecting the color that corresponds to the adjusted palette index.
If the maximum RGB intensity value is greater than the predetermined value, the maximum value of full intensity colors and half intensity values is determined. The number of full intensity values for each RGB color is then calculated. If the maximum number value of full intensity colors is greater than the halftone value, the palette index is set to a predetermined value and the palette index is adjusted by comparing the full intensity value for each RGB color to the halftone value and adjusting the palette index if the full intensity value is greater than the halftone value. The color to be rendered at the (x, y) position is then chosen by selecting the color that corresponds to the adjusted palette index.
Additional features and advantages of the invention will be made apparent from the following detailed description of illustrative embodiments which proceeds with reference to the accompanying figures.